package com.zzty.txj1.service.impl;


import com.zzty.txj1.dao.SportDao;
import com.zzty.txj1.entity.Sport;
import com.zzty.txj1.service.SportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SportServiceImpl implements SportService {
    @Autowired
    private SportDao sportDao;

    @Override
    public Sport getSportById(Sport sport){
        Sport sport1=sportDao.getSportById(sport);
        return sport1;
    }

    @Override
    public Sport getSportByUserIdAndDate(Sport sport) {
        Sport sport1=sportDao.getSportByUserIdAndDate(sport);
        return sport1;
    }

    @Override
    public Integer initInformation(Sport sport) {
        Integer flag=sportDao.initInformation(sport);
        return flag;
    }

    @Override
    public Integer updateStartTime(Sport sport) {
        Integer count=sportDao.updateStartTime(sport);
        return count;
    }

    @Override
    public Integer updateMiddleTime(Sport sport) {
        Integer count=sportDao.updateMiddleTime(sport);
        return count;
    }

    @Override
    public Integer updateFinishTime(Sport sport) {
        Integer count=sportDao.updateFinishTime(sport);
        return count;
    }

    @Override
    public Integer updateSpendTime(Sport sport) {
        Integer count=sportDao.updateSpendTime(sport);
        return count;
    }

    @Override
    public Integer updateImg1(Sport sport) {
        Integer count=sportDao.updateImg1(sport);
        return count;
    }
    @Override
    public Integer updateImg2(Sport sport) {
        Integer count=sportDao.updateImg2(sport);
        return count;
    }
}
